package com.dwxt.cdms.view;

import com.dwxt.cdms.util.DictUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;

import javax.persistence.Column;
import java.time.LocalDateTime;

/**
 * 设备 & 客户 返回数据
 *
 * @author Kuang.JiaZhuo
 * @date 2020-09-05 16:48
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class EquipmentCustomView {

    /********************************* 客户信息 *****************************/
    private String id;

    /**
     * 设备id
     */
    private String equipmentId;

    /**
     * 客户id
     */
    private Integer customerId;

    /**
     * 客户姓名
     */
    private String name;

    /**
     * 所属区县
     */
    private String county;

    /**
     * 所属街道
     */
    private String street;

    /**
     * 所属社区
     */
    private String community;

    /**
     * 电话号码
     */
    private String phone;

    /**
     * 家庭住址
     */
    private String address;

    /**
     * 创建时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime createTime;

    /********************************* 设备信息  *****************************/

    /**
     * 设备类别;关联数据字典【category】
     */
    private String category;

    /**
     * 设备类别前端显示
     */
    public String getCategoryDisplay(){
        return category==null?null: DictUtil.getDisplay("category",category);
    }

    /**
     * 设备名称
     */
    private String equipmentName;

    /**
     * 设备序列号
     */
    private String serialNumber;

    /**
     * 设备参数
     */
    private String parameter;

    /**
     * 发放状态;关联数据字典【distributionStatus】
     */
    @Column(name = "distribution_status")
    private String distributionStatus;

    /**
     * 发放状态 前端显示
     */
    public String getDistributionStatusDisplay(){
        return distributionStatus==null?null: DictUtil.getDisplay("distributionStatus",distributionStatus);
    }

    /**
     * 归档人姓名
     */
    @Column(name = "archivist_name")
    private String archivistName;

    /**
     * 设备厂家信息
     */
    private String manufacturerInformation;

    /**
     * 备注信息
     */
    private String remarks;

    private String lbUserid;

    public String getLbUserid() {
        return lbUserid;
    }

    public void setLbUserid(String lbUserid) {
        this.lbUserid = lbUserid;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(String equipmentId) {
        this.equipmentId = equipmentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public String getCommunity() {
        return community;
    }

    public void setCommunity(String community) {
        this.community = community;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String homeAddress) {
        this.address = homeAddress;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getEquipmentName() {
        return equipmentName;
    }

    public void setEquipmentName(String equipmentName) {
        this.equipmentName = equipmentName;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getParameter() {
        return parameter;
    }

    public void setParameter(String parameter) {
        this.parameter = parameter;
    }

    public String getDistributionStatus() {
        return distributionStatus;
    }

    public void setDistributionStatus(String distributionStatus) {
        this.distributionStatus = distributionStatus;
    }

    public String getArchivistName() {
        return archivistName;
    }

    public void setArchivistName(String archivistName) {
        this.archivistName = archivistName;
    }

    public String getManufacturerInformation() {
        return manufacturerInformation;
    }

    public void setManufacturerInformation(String manufacturerInformation) {
        this.manufacturerInformation = manufacturerInformation;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }
}
